﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JabberBotCore;

namespace helper
{
    public class msg
    {
        public msg()
        {

        }

        public static JabberBotCore.CoreCommand MsgToCommand(String msg)
        {
            if(msg[0]!='!')
                return null;
            var command = new CoreCommand();
            String[] str = msg.Split(' ');

            command.CommandType = str[0].Substring(1);
            command.Msg = msg.Substring(str[0].Length + 1);
            command.Owner = null;
            return command;
        }
    }
}
